package com.plasticene.boot.example.web.provider;

import com.plasticene.boot.web.core.advice.ApiSecurityKeyProvider;
import com.plasticene.boot.web.core.model.ApiSecurityKey;

/**
 * @author fjzheng
 * @version 1.0
 * @date 2025/5/23
 */
public class DatabaseApiKeySecurityProvider implements ApiSecurityKeyProvider {
    @Override
    public ApiSecurityKey getApiSecurityKey(String appId) {

        // 根据appid查platform表数据，如果为空直接报错
        ApiSecurityKey apiSecurityKey = new ApiSecurityKey();
        apiSecurityKey.setRsaPrivateKey("MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDtUiTm53YKJXHVlzjTXSlL5Ajd/8p33Wy71pYCP/U2SIPNZ+3lX8LUKh2PFLLxr9RCtJAA7wGWtDbiywDe/2I90ZOGUUfIExPShv2wRCbSwMRtdcKYnUD78/ZCl2FKSKjOlbzFbBjIX5qLTk557+xNj72F7jlqGqW8KEFSHFykowyNmicWdjGjjYg6n1ylejwt/T47rFh22xzfo7fcffS4LxgbLzwR7fvbMhgl1tyog66idsY4iyAGhUAf+Waifxqtdo6SeIMSks0AzGJuIbPvPN2GkHHoiAScjQlu71QMCEznlgHotuYBsy/kMksi6ok5i1ygFdkDF92aetmOllbtAgMBAAECggEACjSHfIJxjTTxzmlTutfju1OE0H8VmgGK+BAQ07hXKn/Q/L4LLEG2ia1+wRtdXCh4355CHwT05yHvkxSygErJ7IMDOm039MuVOG79Oio3Sfk0hfx6L/Phl02oLLiAj4aZjVPbeHKrvvOvHDraA9y99AV9W35uBTkJU99rR6uk9DnIt1Ajgp10068s92Ube8chaCMoppuKh9bgJ1KWKK/TEvu4OwjeXMoINY1GDP4+SSsEUQeN9fyXwLMjV89scvKorglMFZSe/18azALjafNP2leteRnGqVQ800WbvQxb3EQSUULQbEu3VDm5sWRTzg7FbPXFQdcR81euZYHC1DDRQQKBgQD1zlwX6EhlISpyiH1izd3+DZPHAFrvUsGN2cUp6V/p3Sr7zE6LKmiVTOJxpf09f5XEw9GwE01H4Tj/Gao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IYJdbcqIOuonbGOIsgBoVAH/lmon8arXaOkniDEpLNAMxibiGz7zzdhpBx6IgEnI0Jbu9UDAhM55YB6LbmAbMv5DJLIuqJOYtcoBXZAxfdmnrZjpZW7QIDAQAB");
        apiSecurityKey.setThirdRsaPublicKey("MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA7VIk5ud2CiVx1Zc4010pS+QI3f/Kd91su9aWAj/1NkiDzWft5V/C1CodjxSy8a/UQrSQAO8BlrQ24ssA3v9iPdGThlFHyBMT0ob9sEQm0sDEbXXCmJ1A+/P2QpdhSkiozpW8xWwYyF+ai05Oee/sTY+9he45ahqlvChBUhxcpKMMjZonFnYxo42IOp9cpXo8Lf0+O6xYdtsc36O33H30uC8YGy88Ee372zIYJdbcqIOuonbGOIsgBoVAH/lmon8arXaOkniDEpLNAMxibiGz7zzdhpBx6IgEnI0Jbu9UDAhM55YB6LbmAbMv5DJLIuqJOYtcoBXZAxfdmnrZjpZW7QIDAQAB");
        return apiSecurityKey;
    }
}
